qui reghdfe  num_orders_bt  S_sourcing    ///
if n_bt==1 & b_in_sample==1, abs(year) vce (cluster b_id)
capture drop x_sample
gen x_sample=e(sample)

eststo clear
eststo: reghdfe  ln_q_bt_all S_sourcing    ///
if x_sample==1 & n_bt==1 & x_sample==1, abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace    

eststo: reghdfe  ln_med_sh_s_bt_all  S_sourcing  ln_q_bt_all  ///
if x_sample==1 & n_bt==1 , abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace  	
	
eststo: reghdfe  ln_max_sh_s_bt_all  S_sourcing  ln_q_bt_all   ///
if x_sample==1 & n_bt==1 & x_sample==1, abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace 	
	
eststo: reghdfe  ln_num_orders_bt  S_sourcing ln_q_bt_all   ///
if x_sample==1 & n_bt==1 & x_sample==1, abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace    

eststo: reghdfe  ln_num_ship_bt  S_sourcing ln_q_bt_all   ///
if x_sample==1 & n_bt==1 & x_sample==1, abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace    

eststo: reghdfe  ln_num_j_bt_insample  S_sourcing ln_q_bt_all    ///
if x_sample==1 & n_bt==1 & x_sample==1, abs(year) vce (cluster b_id)
	quietly estadd local CTRL2 ="y", replace   

 esttab using "${tables}\TableC2PanelA.tex", ///
  label replace booktabs b(3) se(3) noconstant obslast substitute(\_ _) ///
  drop( ) order( ) /// 
  stats(CTRL2 r2   N   , fmt( %~#s 2 %12.0fc  )  ///
  labels("FEs" `"\(R^{2}\)"'  "Obs."  ))   ///
  star(* 0.10 ** 0.05 *** 0.01) ///
  nonotes  	